<?php $this->load->view('admin/public/head.html', array('css' => array(
'/assets/admin/css/admin/common.css'
))); ?>
<!-- Content Wrapper. Contains page content -->
<div class="content-wrapper admin-user-list" ng-controller="admin-purchaser-user-index">
    <!-- Content Header (Page header) -->
    <section class="content-header">
        <h1>
            会员管理
            <small>前台会员账号设置</small>
        </h1>
        <ol class="breadcrumb">
            <li><a href="#"><i class="fa fa-dashboard"></i>后台首页</a></li>
            <li class="active">会员列表</li>
        </ol>
    </section>

    <!-- Main content -->
    <section class="content">

        <div class="row">

            <div class="col-md-12">
                <div class="box">
                    <div class="box-header with-border">
                        <h3 class="box-title">会员列表</h3>
                        <!--
                        <div class="box-tools">
                            <div class="input-group input-group-sm" style="width: 150px;">
                                <input type="text" name="table_search" class="form-control pull-right" placeholder="搜索">
                                <div class="input-group-btn">
                                    <button type="submit" class="btn btn-default"><i class="fa fa-search"></i></button>
                                </div>
                            </div>
                        </div>
                        -->
                    </div>
                    <!-- /.box-header -->
                    <div class="box-body">
                        <table class="table table-bordered" style="margin-bottom: 30px">
                            <tr>
                                <th class="text-center" style="width: 40px">#</th>
                                <th style="width: 50px;">头像</th>
                                <th>昵称</th>
                                <th class="text-center">手机</th>
                                <th class="text-center">总资产</th>
                                <th class="text-center">冻结资产</th>
                                <th class="text-center">提现中</th>
                                <th class="text-center">仅购物</th>
                                <th class="text-center">活动资金</th>
                                <th class="text-center">账户积分</th>
                                <th class="text-center">用户来源</th>
                                <th class="text-center">注册时间</th>
                                <th class="text-center">用户状态</th>
                                <th class="text-center" style="width: 70px">查看</th>
                            </tr>
                            <?php if (!empty($lists) && is_array($lists['data']) && $lists['total'] != 0): ?>
                            <?php foreach($lists['data'] as $list):?>
                            <tr>
                                <td class="text-center"><?=$list['id']?></td>
                                <td class="text-center">
                                    <img src="<?=$list['avatar']?>" style="width: 40px; height: 40px;" alt="">
                                </td>
                                <td><a href="/user/detail/index?id=<?=$list['id']?>"><?=$list['nickName']?></a></td>
                                <td class="text-center">
                                    <?=$list['phone'] ? $list['phone'] : '--'?>
                                </td>
                                <td class="text-center text-danger"><?= $list['amount_cny']?></td>
                                <td class="text-center text-danger"><?= $list['amountFreeze_cny']?></td>
                                <td class="text-center text-danger"><?= $list['amountCashout_cny']?></td>
                                <td class="text-center text-danger"><?= $list['amountBuy_cny']?></td>
                                <td class="text-center text-danger"><?= $list['amountUnLimit_cny']?></td>
                                <td class="text-center text-danger"><?= $list['score'] ?></td>
                                <td class="text-center">
                                    <?php if(!empty($list['source'])):?>
                                    <?php
                                        switch($list['source']) {
                                            case "ios":
                                            echo '<span class="fa fa-apple Active" style="color: #d2d6de;"></span>';
                                            break;
                                            case "android":
                                            echo '<span class="fa fa-android" style="color: #00c0ef;"></span>';
                                            break;
                                            case "wx":
                                            echo '<span class="fa fa-weixin" style="color:#00a65a;"></span>';
                                            break;
                                        }
                                    ?>

                                    <?php else: ?>
                                        --
                                    <?php endif;?>
                                </td>
                                <td class="text-center"><?=$list['created']?></td>
                                <td class="text-center">
                                    <?= $list['status'] == 1 ? '<span style="color:green;">正常</span>' : '<span style="color:red;">禁用</span>' ?>
                                </td>
                                <td class="text-center">
                                    <a class="btn btn-link btn-flat btn-xs" href="/user/detail/index?id=<?=$list['id']?>"><i class="fa fa-search"></i> 查看</a>
                                </td>
                            </tr>
                            <?php endforeach;?>
                            <?php else: ?>
                            <tr>
                                <td colspan="14"><p class="text-center help-block">暂无数据</p></td>
                            </tr>
                            <?php endif;?>
                        </table>
                    </div>

                    <!-- /.box-body -->
                    <?=$page?>
                </div>
            </div>

        </div>

    </section>
    <!-- /.content -->
</div>

<!-- /.content-wrapper -->
<?php $this->load->view('admin/public/foot.html', array('js' => array(
'/assets/admin/js/user/index.js'
))); ?>

